﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace WindowsFormsApplication1
{
    public partial class קליטת_לקוח : Form
    {
        public קליטת_לקוח()
        {
            InitializeComponent();
        }

        private void קליטת_לקוח_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (c_ID.Text == "" || C_name.Text == "" || c_LastName.Text == "" || c_email.Text == "" || c_phone.Text == "")
            {
                MessageBox.Show("יש למלא את כל השדות");
            }
            else
            {
                Controller.Controller cont = new Controller.Controller();
                cont.addCustomer(c_ID.Text, C_name.Text, c_LastName.Text, c_email.Text, c_phone.Text, c_bill.Text);
                MessageBox.Show("הלקוח התווסף בהצלחה");
            }
        }

        private void label5_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            View.customerTableFormRe f1 = new View.customerTableFormRe();
            f1.ShowDialog();
        }

        private void return_b_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form1 f1 = new Form1();
            f1.ShowDialog();
        }
    }
}
